package com.shyt.util;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

public class ExecuteJob implements Job {
        public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
            //输出当前时间
            Date date=new Date();
            SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            String dateString=dateFormat.format(date);
            //工作内容
            System.out.println("执行定时任务，时间是："+dateString);
        }

}
